import { GitChanges } from './git-changes'
export class GitStatus {
  all: GitChanges
  staged: GitChanges
  notStaged: GitChanges
  constructor() {
    this.all = GitChanges.fromShortStatus()
    const [staged, notStaged] = GitChanges.divideByStaged(this.all)
    this.staged = staged
    this.notStaged = notStaged
  }
  hasChanged() {
    return this.all.count() > 0
  }
  hasStaged() {
    return this.staged.count() > 0
  }
  hasNotStaged() {
    return this.notStaged.count() > 0
  }
}
